{extend name='template/base'}{/extend}
{block name='title'}{/block}
{block name='style'}{/block}
{block name='script'}{/block}
{block name='footer'}{/block}
{block name='content'}

<header class="header">
    <div>
        <a class="back" href="{:url('cart/Cart/index')}"><i
                class="iconfont icon-zuoyoujiantou-copy-copy-copy"></i></a>
        确认订单
    </div>
</header>
<div class="pages" id="order_page">
    <div class="list-form other not-t">
        <ul>
            <li>
                <a id="set_address" class="list-form-link">
                    <div class="checkbox-view">
                        <input type="radio" name="address" checked value="{$user_address.id}" @change="default_check()">
                    </div>
                    <div>
                        <div class="font14">
                            <div class="pull-left">收货人：</div>
                            <div class="overflow-hidden">
                                <div>{$user_address.name} <span class="pull-right">{$user_address.mobile}</span>&nbsp;</div>
                            </div>
                        </div>
                       <div class="font12">
                           <div class="pull-left">收货地址：</div>
                           <div class="overflow-hidden">
                               <div>{$user_address.province}{$user_address.city}{$user_address.district}{$user_address.address}</div>
                           </div>
                       </div>
                    </div>
                </a>
            </li>
            <li>
                <div class="checkbox-view">
                    <input type="radio" name="address" value="0" @change="other_check()" >
                    <input type="hidden" name="o_province" id="o_province" value="">
                    <input type="hidden" name="o_city" id="o_city" value="">
                    <input type="hidden" name="o_district" id="o_district" value="">
                    <input type="hidden" name="o_lng" id="o_lng" value="">
                    <input type="hidden" name="o_lat" id="o_lat" value="">
                    <input type="hidden" name="o_zoom" id="o_zoom" value="12">
                    <input type="hidden" name="o_name" id="o_name" value="">
                </div>
                <div class="font12">临时收货地址</div>
                <div id="other_address" style="display: none;">
                    <div class="add-btn-right mt-unify">
                        <div class="l">
                            <div><input type="text" id="o_address" name="o_address" placeholder="收货地址"></div>
                        </div>
                        <!--<div class="r">-->
                        <!--<i class="iconfont icon-ditu"></i>-->
                        <!--</div>-->
                    </div>
                    <div class="add-btn-right">
                        <div class="l">

                            <div><input type="tel" name="o_mobile" id="o_mobile" placeholder="电话"></div>
                        </div>
                    </div>
                    <div class="add-btn-right">
                        <div class="l">
                            <textarea name="remark" id="remark" placeholder="留言（有什么要求可以写在这里）"></textarea>
                        </div>
                    </div>
                </div>

            </li>
            <!--<li>-->
                <!--<div class="checkbox-view"></div>-->
                <!--<div class="add-btn-right">-->
                    <!--<div class="l">-->
                        <!--<div>-->
                            <!--<textarea name="remark" id="remark" placeholder="我要留言"></textarea>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="r">-->
                    <!--<i class="iconfont icon-yuyin"></i>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</li>-->
        </ul>


        {volist name="list" id="vo"}
        <div style="border-top: 5px solid #ececec ">
            <div class="shop-list title">
                <ul>
                    <li>
                        <div class="img"><img src="{$vo['logo']}" height="441" width="500"/></div>
                        <div class="text">{$vo['name']}</div>
                    </li>
                </ul>
            </div>
            <div>
                <ul>
                    <li>
                        {volist name="vo['items']" id="item"}
                        <p class="order-list">
                            <span class="font12">{$item['name']}</span>
                            <span>x{$item['num']}</span>
                            <span>￥{$item['price']}</span>
                        </p>
                        {/volist}
                    </li>
                    <li class="color-primary">
                        <span class="pull-right">小计：￥{$vo['total_price']}</span>
                    </li>
                </ul>
            </div>
        </div>
        {/volist}


    </div>
    <div class="foot-btn">
        <div>
            总价：{$total_price}元
            <a @tap.stop="add_order()" class="btn">提交订单</a>
        </div>
    </div>
</div>

{/block}
{block name='script_extra'}
<script>
    var add_order_url = "{:url('order/Order/add_order')}";
    var pay_url = "{:url('order/Order/pay')}";
    var address_url = "{:url('user/address/index')}";
    var cart_ids = "{$cart_ids}";
    var c_url = "{$c_url}";
    var back_url = "{$back_url}";
    require(['order/send_order']);
</script>
{/block}